<?php
    apf_require_class("PageHelper");
    $img_path = '/img/home/';
    ?>

<div class="header">
    <div class="bg_top"></div>
    <div class="logo"></div>
</div>
<div class="container">
    <h3>岗位/薪资异动申请</h3>
    <form id="form1" action="" method="post" style="width: 837px;margin: 0 auto">
        <ul>
            <li class="comInfo">
                <span class="title" style="margin-right: 25px;">基&nbsp;本&nbsp;信&nbsp;息</span>
                <span >姓名<em class="necessary">*</em>：<input type="text" style="width: 50px" class="inp<?php if($transfer_info['flow_id']){?> nameW<?php }?>" id="ipt_name" name="user_name" value="<?=$transfer_info['before_info'][0]?>"/></span>
                <span>工号<em class="necessary">*</em>：<input type="text" class="inp<?php if($transfer_info['flow_id']){?> nameW<?php }?>" id="ipt_code" name="user_code" value="<?=$transfer_info['before_info'][1]?>"/></span>
                <span>部门：<input type="text" class="inp2" readonly id="ipt_department" value="<?=$transfer_info['before_info'][2].$transfer_info['before_info'][3].$transfer_info['before_info'][4]?>"/></span>
                <span>职位：<input type="text" class="inp2" readonly id="ipt_job" value="<?=$transfer_info['before_info'][5]?>"/></span>
                <span>职级：<input type="text" class="inp2" style="width: 50px" readonly id="ipt_level" value="<?=$transfer_info['before_info'][7]?>"/></span>
            </li>
            <li class="salary">
            <span class="title">薪资异动原因</span>
            <?php foreach($salary_type as $index=>$row){?>
                <?php if($row != '其它'){?>
                    <span><input type="radio" name="salary_type" value="<?=$index?>" <?php if($transfer_info['salary_type']==$index) echo 'checked';?>/><?=$row?></span>
                <?php }else{?>
                    <span><input type="radio" name="salary_type" value="<?=$index?>" <?php if($transfer_info['salary_type']==$index) echo 'checked';?>/>其它：<input type="text" style="width: 116px;" name="salary_reason" value="<?=htmlspecialchars($transfer_info['salary_reason'])?>"/></span>
                <?php }?>
            <?php }?>
            </li>
            <li class="salary">
            <span class="title">岗位异动类别</span>
            <?php foreach($transfer_type as $index=>$row){?>
                <?php if($row != '其它'){?>
                    <span><input type="radio" name="transfer_type" value="<?=$index?>" <?php if($transfer_info['transfer_type']==$index) echo 'checked';?>/><?=$row?></span>
                <?php }else{?>
                    <span><input type="radio" name="transfer_type" value="<?=$index?>" <?php if($transfer_info['transfer_type']==$index) echo 'checked';?>/>其它：<input type="text" style="width: 116px;" name="transfer_reason" value="<?=htmlspecialchars($transfer_info['transfer_reason'])?>"/></span>
                <?php }?>
            <?php }?>
            <div class="apply" id="apply"><span >申请职位<em class="necessary" id="a_apply_job">&nbsp;&nbsp;</em>：<input type="text" class="inp1" id="input_type" style="width:200px;" name="job_name" value="<?=$transfer_info['after_info'] ?>"></span></div>
            <div class="apply" id="apply_super"><span >直属主管<em class="necessary">*</em>：<input type="text" class="inp1" id="input_type_user" style="width:200px;" name="super_name" value="<?=$transfer_info['super_name'] ?>"></span></div>
            </li>
            <li class="comInfo">
                <span class="title" style="margin-right: 25px;">调&nbsp;整&nbsp;职&nbsp;级</span><span>调整职级：
                    <select style="width: 60px;height: 25px" name="p_level">
                        <option value="0">P级</option>
                        <?php foreach($p_level as $row){?>
                            <option value="<?=$row['id']?>" <?php if($transfer_info['p_level'] == $row['id'])echo 'selected';?>><?=$row['degree']?></option>
                        <?php }?>
                    </select>
                    <select style="width: 60px;height: 25px;margin-left: 10px" name="m_level">
                        <option value="0">M级</option>
                        <?php foreach($m_level as $row){?>
                            <option value="<?=$row['id']?>" <?php if($transfer_info['m_level'] == $row['id']) echo 'selected';?>><?=$row['degree']?></option>
                        <?php }?>
                    </select>
                </span>
            </li>
            <li class="salary" style="border-bottom: none">
                <span class="title" style="width:98px;">建议生效日期<em class="necessary">*</em></span><span><input type="text" class="inp1 date" id="entry_date" name="plan_date" value="<?php if($transfer_info['plan_date']) echo date('Y-m-d',strtotime($transfer_info['plan_date'])) ?>"></span>
            </li>
                <input type="hidden" name="user_id" />
                <input type="hidden" name="job_id" value="<?=$transfer_info['new_job_id']?>"/>
                <input type="hidden" name="city_id" />
                <input type="hidden" name="new_city_id" id="new_city_id" value="<?=$transfer_info['new_city_id']?>" />
                <input type="hidden" name="new_super_uid" id="super_user_id" value="<?=$transfer_info['new_super_uid']?>" />
        </ul>
        <?php if($edit_flag){?>
        <div class="submit" id="submit"></div>
        <?php }?>
    </form>

</div>
<div class="footer">
</div>


<?php $this->script_block_begin(); ?>
<script type="text/javascript">
var positionResult = true;
<?php if(!$edit_flag){?>
    $("input").attr("disabled","disabled");
    $("select").attr("disabled","disabled");
<?php }?>
var url_user = "<?php echo Portal_Urls::ajax_search_user();?>";
var ajaxUrl2 = '<?php echo Portal_Urls::ajax_search_job()?>';
</script>


<?php $this->script_block_end(); ?>